<?php
	include_once("login.php");
	$conn = new mysqli($host,$user,$passwd, $database)
	or die("SQL connect error: ".mysqli_connect_error());
	
	$Modifydate = $_GET['ModifyDate'];
	$id = $_GET["Username"];

	$stmt = mysqli_prepare($conn,"UPDATE ContactsBackup Set Zip = ?, ModifyDate = ?
						 WHERE Username = '$id'");
	
	mysqli_stmt_bind_param($stmt, 'bs', $zip, $ModifyDate);
	#Get some binary data from somewhere
	$file = "php://input";
	$fp = fopen($file, "r");
	$size = 0;

	while ($zip = fread($fp, 1024)) {
		$size += strlen($zip);
		mysqli_stmt_send_long_data ($stmt, 0, $zip);
	}
print $ModifyDate;
	mysqli_stmt_execute($stmt) or die ("Statement error: ".mysqli_connect_error());			
	print "Data of size ($size bytes) was added to the Users table for $name \n";
	mysqli_stmt_close($stmt);
	mysqli_close($conn);
	fclose($fp);
?>